package me.softwareengineer.guice.rendering.listener;

import java.util.Map;

import me.softwareengineer.guice.rendering.domain.AnchorElement;

/**
 * Called to notify about {@link AnchorElement}.
 * 
 * @author yadtahir
 * 
 *         <pre>
 * This class is thread-safe and immutable.
 * </pre>
 */
public final class OnAnchorEvent extends Event {
	/**
	 * Holds the unquie name of the anchor
	 */
	private String name;

	/**
	 * Creates an onAnchor event
	 * 
	 * @param properties
	 *            the properties of the element
	 * @param name
	 *            the unqiue name of the anchor
	 */
	public OnAnchorEvent(String name, Map<String, String> properties, Map<String,Object> metadata) {
		super(properties, metadata);
		this.name = name;
	}

	/**
	 * 
	 * @return the unqiue name of the anchor
	 */
	public String getAnchorName() {
		return name;
	}
}
